/* readv, writev, preadv, pwritev
 *
 * read or write data into multiple buffers
 */

#include <sys/uio.h>

ssize_t readv(int fd, const struct iovec *iov, int iovcnt);

ssize_t writev(int fd, const struct iovec *iov, int iovcnt);

ssize_t preadv(int fd, const struct iovec *iov, int iovcnt,
               off_t offset);

ssize_t pwritev(int fd, const struct iovec iovec *iov, int iovcnt,
                off_t offset);

struct iovec {
    void   *iov_base;   /* Starting address */
    ssize_t iov_len;    /* Number of bytes to transfer */
};
